package com.gexiaobao.pigeon.app.model.bean

import android.os.Parcelable
import com.chad.library.adapter.base.entity.MultiItemEntity
import kotlinx.android.parcel.Parcelize

/**
 * @Author      : hxw
 * @Date        : 2023/3/3 14:45
 * @Describe    :
 */
@Parcelize
class ShopOrderListResponse(

    var total: Int = 0,
    var list: ArrayList<ListBean> = ArrayList(),
    override val itemType: Int

) : Parcelable, MultiItemEntity {

    /**
     * 数据是否为空
     */
    fun isEmpty() = list == null || (list as List<*>).isEmpty()

    @Parcelize
    class ListBean(

        var id: Int = 0,
        var shopId: Int = 0,
        var orderStatus: Int = 0,//0--生成，1-支付中，2-支付成功，3-已发货 4-已签收 5-支付失败，6-退款中，7-退款成功，8-退款失败,9-订单关闭 10-已评价, 11-退货中 12-退货成功 13-退货失败）
        var orderNo: String = "",
        var finalPrice: Double = 0.00,
        var expireTime: String = "",
        var goodCount: Int = 0,
        var closeSecond: Long = 0,
        var list: ArrayList<ListStore> = ArrayList(),
        override var itemType: Int

    ) : Parcelable, MultiItemEntity {

        /**
         * 数据是否为空
         */
        fun isEmpty() = list == null || (list as List<*>).isEmpty()

        @Parcelize
        class ListStore(

            var shopId: Int = 0,
            var shopOrderId: Int = 0,
            var shopExpressFee: Double = 0.00,
            var shopName: String = "",
            var list: ArrayList<ListGoods> = arrayListOf(),
            override var itemType: Int,

            ) : Parcelable, MultiItemEntity {

            /**
             * 数据是否为空
             */
            fun isEmpty() = list == null || (list as List<*>).isEmpty()

            @Parcelize
            class ListGoods(

                var goodName: String = "",
                var specName: String = "",
                var specImg: String = "",
                var salePrice: Double = 0.00,
                var amount: Int = 0,
                var id: Int = 0,
                override var itemType: Int

            ) : Parcelable, MultiItemEntity
        }
    }
}